<section class="content-header">
    <h1>
        意向客户
    </h1>
    <ol class="breadcrumb">
        <li><a ui-sref="dashboard"><i class="fa fa-dashboard"></i>我的面板</a></li>
        <li><a class="active">意向客户</a></li>
    </ol>
</section>
<section class="content">
    <div class="box box-danger">
        <div class="box-header">
            <h3 class="box-title"></h3>
            <div class="box-tools">
                <select 
                    name="search_type"  
                    class="form-control" 
                    ng-model="searchType" 
                    ng-change="searchTypeChange()" 
                    style="position: absolute;right: 240px;top: 0px;height: 30px;padding: 0px 12px;"
                >
                    <option value="name">按客户名称搜索</option>
                    <option value="contact">按联系人搜索</option>
                </select>
                <div class="input-group input-group-sm" style="width: 236px;">
                    <input type="text" name="table_search" class="form-control pull-right" ng-model="search.name" ng-attr-placeholder="{{typePlaceholder}}">
                    <div class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="query()"><i class="fa fa-search"></i></button>
                    </div>
                </div>
            </div>
        </div>
        <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
                <tbody>
                    <tr>
                        <th style="width: 10px">#</th>
                        <th>客户名称</th>
                        <!-- <th>联系人</th> -->
                        <!-- <th>联系电话</th> -->
                        <th>业务员</th>
                        <th>助理</th>
                        <th>客户来源</th>
                        <th>介绍人</th>
                        <th>创建日期</th>
                        <th class="opt-col">操作</th>
                    </tr>
                    <tr ng-repeat="item in data.items">
                        <td ng-bind="($index+1)+'.'"></td>
                        <td ng-bind="item.name"></td>
                        <!-- <td ng-bind="item.contact"></td> -->
                        <!-- <td ng-bind="item.mobile"></td> -->

                        <td ng-bind="item.salesman"></td>
                        <td ng-bind="item.assistant_name"></td>
                        <td ng-bind="item.source"></td>
                        <td ng-bind="item.source_name"></td>
                        <td ng-bind="format(item.date_created, 'YYYY-MM-DD HH:mm')"></td>
                        <td class="opt-col">
                            <a class="fa fa-info-circle" ui-sref="reserve.detail.view({id: item.id})" title="详情"></a>
                            <a class="fa fa-pencil orange" ui-sref="reserve.detail.edit({id: item.id})" title="修改"></a>
                            <a href="javascript:;" class="fa fa-check-square-o green" ng-click="transfer(item)" title="转正式客户"></a>
                            <a class="fa fa-clock-o green" ui-sref="timeline({id: item.id})" title="查看日志"></a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="box-footer clearfix">
            <a ui-sref="reserve.detail.add" class="btn btn-sm btn-info btn-flat pull-left">新增客户</a>
            <div pagination page-data="data.page" page-click="go(idx)"></div>
        </div>
    </div>
</section>
